# eric7.EricWidgets.EricProcessDialog

Module implementing a dialog starting a process and showing its output.

### Global Attributes

None

### Classes

EricProcessDialog | Class implementing a dialog starting a process and showing its output.

### Functions

None

## EricProcessDialog

Class implementing a dialog starting a process and showing its output.

It starts a QProcess and displays a dialog that shows the output of the process. The dialog is modal, which causes a synchronized execution of the process.

### Derived from

QDialog, Ui_EricProcessDialog

### Class Attributes

None

### Class Methods

None

### Methods

EricProcessDialog | Constructor
__finish | Private slot called when the process finished or the user pressed the button.
__procFinished | Private slot connected to the finished signal.
__readStderr | Private slot to handle the readyReadStandardError signal.
__readStdout | Private slot to handle the readyReadStandardOutput signal.
keyPressEvent | Protected slot to handle a key press event.
normalExit | Public method to check for a normal process termination.
normalExitWithoutErrors | Public method to check for a normal process termination without error messages.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_input_returnPressed | Private slot to handle the press of the return key in the input field.
on_passwordCheckBox_toggled | Private slot to handle the password checkbox toggled.
on_sendButton_clicked | Private slot to send the input to the git process.
startProcess | Public slot used to start the process.

### Static Methods

None

#### EricProcessDialog (Constructor)

EricProcessDialog(outputTitle="", windowTitle="", showProgress=False, showInput=True, combinedOutput=False, monospacedFont=None, encoding="utf-8", parent=None, )

Constructor

outputTitle (str (optional))
  title for the output group (defaults to "")
windowTitle (str (optional))
  title of the dialog (defaults to "")
showProgress (bool (optional))
  flag indicating to show a progress bar (defaults to False)
showInput (bool (optional))
  flag indicating to allow input to the process (defaults to True)
combinedOutput (bool (optional))
  flag indicating to show output of the stderr channel in the main output pane (defaults to False)
monospacedFont (QFont)
  font to be used (should be a monospaced one) (defaults to None)
encoding (str (optional))
  encoding used for the communication with the process (defaults to "utf-8")
parent (QWidget (optional))
  reference to the parent widget (defaults to None)

#### EricProcessDialog.__finish

__finish()

Private slot called when the process finished or the user pressed the button.

#### EricProcessDialog.__procFinished

__procFinished(exitCode, exitStatus)

Private slot connected to the finished signal.

exitCode (int)
  exit code of the process
exitStatus (QProcess.ExitStatus)
  exit status of the process

#### EricProcessDialog.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal.

It reads the error output of the process and inserts it into the error pane.

#### EricProcessDialog.__readStdout

__readStdout()

Private slot to handle the readyReadStandardOutput signal.

It reads the output of the process and inserts it into the output pane.

#### EricProcessDialog.keyPressEvent

keyPressEvent(evt)

Protected slot to handle a key press event.

evt (QKeyEvent)
  the key press event

#### EricProcessDialog.normalExit

normalExit()

Public method to check for a normal process termination.

Return:
  flag indicating normal process termination

Return Type:
  bool

#### EricProcessDialog.normalExitWithoutErrors

normalExitWithoutErrors()

Public method to check for a normal process termination without error messages.

Return:
  flag indicating normal process termination

Return Type:
  bool

#### EricProcessDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button (QAbstractButton)
  button that was clicked

#### EricProcessDialog.on_input_returnPressed

on_input_returnPressed()

Private slot to handle the press of the return key in the input field.

#### EricProcessDialog.on_passwordCheckBox_toggled

on_passwordCheckBox_toggled(isOn)

Private slot to handle the password checkbox toggled.

isOn (bool)
  flag indicating the status of the check box

#### EricProcessDialog.on_sendButton_clicked

on_sendButton_clicked()

Private slot to send the input to the git process.

#### EricProcessDialog.startProcess

startProcess(program, args, workingDir=None, showArgs=True, environment=None)

Public slot used to start the process.

program (str)
  path of the program to be executed
args (list of str)
  list of arguments for the process
workingDir (str)
  working directory for the process
showArgs (bool)
  flag indicating to show the arguments
environment (dict)
  dictionary of environment settings to add or change for the process

Return:
  flag indicating a successful start of the process

Return Type:
  bool

Up